#ifndef WF_SETRELATIVEZERO_H
#define WF_SETRELATIVEZERO_H

#include "pf_previewactioninterface.h"
#include "gui_export.h"

/**
 * This action class can handle user events to set
 * the relative Zero point.
 * It overrides but retains the locking of the relative Zero.
 *
 */
class GUI_EXPORT WF_SetRelativeZero : public PF_PreviewActionInterface {
	Q_OBJECT
public:
    WF_SetRelativeZero(PF_Container& container,
                             PF_GraphicView& graphicView);
    ~WF_SetRelativeZero() {}

	static QAction* createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/);

	virtual LX_Define::ActionType rtti() {
		return LX_Define::ActionSetRelativeZero;
	}

    virtual void trigger();
    virtual void mouseMoveEvent(PF_MouseEvent* e);
    virtual void mouseReleaseEvent(PF_MouseEvent* e);
	
	virtual void coordinateEvent(PF_CoordinateEvent* e);

    virtual void updateMouseButtonHints();
    virtual void updateMouseCursor();
    virtual void updateToolBar();

private:
    PF_Vector pt;
};

#endif
